<script>
	import
	EventType
	from "./common/pushEventType.js"
	export default {
		onLaunch: function() {
			console.log('App Launch')
			// #ifdef MP-WEIXIN
			var statusBarHeight = uni.getWindowInfo().statusBarHeight
			statusBarHeight = statusBarHeight === 0 ? 40 : statusBarHeight
			var menuButton = uni.getMenuButtonBoundingClientRect();
			var menuBarHeight = 2 * (menuButton.top - statusBarHeight) + menuButton.height

			this.globalData.statusBarHeight = statusBarHeight
			this.globalData.menuBarHeight = menuBarHeight
			// #endif
			uni.onPushMessage((res) => {
				var payload = JSON.parse(res.data.payload.text)
				console.log('onPushMessage', payload)
				if (payload.type === 1) {
					//房间内积分变化
					uni.$emit(EventType.ROOM_SCORE_CHANGE, payload)
				} else if (payload.type === 2) {
					//房间内积分变化
					uni.$emit(EventType.ROOM_MEMBER_CHANGE, payload)
				} else if (payload.type === 3) {
					//金币变化
					uni.$emit(EventType.COIN_CHANGE, payload)
					console.log("COIN_CHANGE", payload)
					var msg = ""
					if (payload.coinChangeType === 1) {
						//增加
						msg = msg + "+"
					}
					if (payload.coinChangeType === 2) {
						//减少
						msg = msg + "-"
					}
					this.$store.dispatch('ObtainUserInfo').then(result => {})
					uni.showToast({
						icon: 'none',
						title: '金币 ' + msg + payload.score
					})
				} else if (payload.type === 4) {
					//强制离开房间
					uni.$emit(EventType.LEAVE_ROOM, payload)
				} else if (payload.type === 5) {
					//强制离开房间
					uni.$emit(EventType.ROOM_CLOSE, payload)
				}

			})

		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		globalData: {
			statusBarHeight: 0,
			menuBarHeight: 0
		}
	}
</script>

<style>
	/*每个页面公共css */
	@font-face {
		font-display: swap;
		font-family: D-DIN;
		font-style: normal;
		font-weight: 700;
		src: url(data:font/woff2;charset/utf-8;base64,d09GMgABAAAAABxsABEAAAAATfgAABwPAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGhYbgW4cIAZgAEQIgWgJj2ARDAqNQIwKCyAAATYCJAM8BCAF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v720HqLhZM5EBh17EklncAwGf7uU89MC2JJVzC1RTqX10AIzhboPzmoyyIMcGrxoSPvuTXzrYO989g+j+kxl/56+RPYDvf/jxp59/+fW33/9wf2ERFXcLzXZGmm3Xh8rVCrWFGt2tIezcPFdr1Bj7e809cbiW6snX17GZcUPuI0oBY+trYa2+dt8aUdZw4Lm1xhqBtY9FI+2u/Uz/TRdlrZJf1+5yrd5IvhVpaXUrod238twKUVY0aFnfXa4vk53l6/40y9U27dmld5fIz5ZQWcLEUlXXoIrjP5N/k1mrpqsEqvbqx+TX5M8k62gpOkuxIi1Fi3opq+NXdczpqOiYa+iY1q/Tn9Up6Gf1gv43nZnXEXTQiVVHtaQV1dK7KirqTyUXFdTn1IZKQXXUXfVr/kwWVKEuqLtqnSz431TeYt/Cn279dSI7m2jf1DfJ7mZ9kxh08jc2Q1p+c8albeSbFWbx3oyAO02Z0WbIRe/OIMxgYWZhhsCMHcMOewUB3IxV8lmtXGgWMPwlnmm+wVFRYnLkMRbyF2kuw1kC1s7qLBVZpCXGoKUsRYViX5bu0OsoVahGdy08W/op5ZUzf5VSURnTxsj4T9lfWXNUnM6WG9Na8rkxdyAPp9DX1U+ofkpx5k/haAlGMZcdPTVKnm2hMqqNpkepkhv1hfMj+aOakseBZoKFPIaNUOm+0HMhAqFOaCFERa/hKTlQKdkNpdRQUFHQjwaUsoAKYF8WduA6oApoLGjh2Z/yyk1/ldaPIIvv8fuKQTEen3iPb/YmGmKh0sDbyC8uw2Ky3ODQPSuVK9MHiPfom+9+wM6PTDR6i9ONhYgZ06qWo/WD2SMHXjjfrF18yVyuxVU8LFG7GLfqkgRCyItEXRzLiY54673kCAdemrWRcZKqHfHVmoWAR7J5KMqxSCtefEmcXpLsnwMAAA) format(woff2)
	}

	.page-bg {
		background: linear-gradient(180deg, rgba(67, 116, 250, 0.7457107843137255) 0%, rgba(196, 218, 255, 1) 20%, rgba(242, 247, 255, 1) 100%);

	}
</style>